

#ifndef _HEADER_H_
#define _HEADER_H_

#include <cstdint>
#include <string>

#include "Las_Export.h"
#include "GUID.h"

namespace las
{
	class LAS_API Header
	{
	public:
		Header();
		Header(const Header &h);
		~Header();
	public:
		Header& operator=(const Header&);
	public:
		std::string GetFileSignature() const;
		void SetFileSignature(std::string const& value);
		std::uint16_t GetSourceID() const;
		void SetSourceID(std::uint16_t value);
		std::uint16_t GetGlobalEncoding() const;
		void SetGlobalEncoding(std::uint16_t value);
		GUID GetProjectID() const;
		void SetProjectID(GUID const &value);
		std::uint8_t GetVersionMajor() const;
		void SetVersionMajor(std::uint8_t value);
		std::uint8_t GetVersionMinor() const;
		void SetVersionMinor(std::uint8_t value);
		std::string GetSystemID() const;
		void SetSystemID(std::string const &value);
		std::string GetSoftwareID() const;
		void SetSoftwareID(std::string const &value);
		std::uint16_t GetCreatDOY() const;
		void SetCreateDOY(std::uint16_t value);
		std::uint16_t GetCreateYear() const;
		void SetCreateYear(std::uint16_t value);
		std::uint16_t GetHeaderSize() const;
		void SetHeaderSize(std::uint16_t value);
		std::uint64_t GetDataOffset() const;
		void SetDataOffset(std::uint64_t value);
		std::uint32_t GetRecordCount() const;
		void SetRecordCount(std::uint32_t value);
		std::uint8_t GetPointFormat() const;
		void SetPointFormat(std::uint8_t value);
		std::uint16_t GetPointRecordLength() const;
		std::uint64_t GetPointRecordsCount() const;
		void SetPointRecordsCount(std::uint64_t value);
		std::uint64_t* GetPointRecordsByReturn() const;
		void SetPointRecordsByReturn(std::size_t index, std::uint64_t value);
		double GetScaleX() const;
		double GetScaleY() const;
		double GetScaleZ() const;
		void SetScale(double x, double y, double z);
		double GetOffsetX() const;
		double GetOffsetY() const;
		double GetOffsetZ() const;
		void SetOffset(double x, double y, double z);
		double GetMaxX() const;
		double GetMinX() const;
		double GetMaxY() const;
		double GetMinY() const;
		double GetMaxZ() const;
		double GetMinZ() const;
		void SetMax(double x, double y, double z);
		void SetMin(double x, double y, double z);
		std::uint64_t GetStartOfWaveform() const;
		void SetStartOfWaveform(std::uint64_t value);
	private:
		void Init();
	private:
		char m_Signature[4];
		std::uint16_t m_SourceId;
		std::uint16_t m_GlobalEncoding;
		std::uint32_t m_ProjectId1;
		std::uint16_t m_ProjectId2;
		std::uint16_t m_ProjectId3;
		std::uint8_t m_ProjectId4[8];
		std::uint8_t m_VersionMajor;
		std::uint8_t m_VersionMinor;
		char m_SystemId[32];
		char m_SoftwareId[32];
		std::uint16_t m_CreateDOY;
		std::uint16_t m_CreateYear;
		std::uint16_t m_HeaderSize;
		std::uint64_t m_DataOffset;
		std::uint32_t m_RecordsCount;
		std::uint8_t m_PointFormat;
		std::uint16_t m_PointRecordLength;
		std::uint64_t m_PointRecordsCount;
		std::uint64_t m_PointRecordsByReturn[15];
		double m_Scales[3];
		double m_Offsets[3];
		double m_Extent[6];
		std::uint64_t m_StartOfWaveform;
	};
}




#endif